1 zdnuist 2018-07-30 16:40:44 +08:00 Quartz |
![]() | 2 b821025551b 2018-07-30 16:42:29 +08:00 这种用 Redis 来实现很方便。 |
![]() | 3 qf0129 2018-07-30 16:49:42 +08:00 via iPhone Celery 有 async_task 可以指定时间或者延迟执行 |
![]() | 5 Rekkles 2018-07-30 17:14:40 +08:00 crontab |
![]() | 7 tomczhen 2018-07-30 17:19:18 +08:00 via Andrid 业余允许的话,在建立订单的时候设定好 expire at 时间,同时返回 expire in n sec 给前端,发生查询或业务时判断 expire at 时间来做是否过期判断。 |
![]() | 8 Zzdex OP @tomczhen #7 expire 在订单生成时 确实订好了,但是过期的订单,在过期之后需要一些操作必须在后端完成,,比如说发通知给用户 |
![]() | 9 misaka19000 2018-07-30 17:33:58 +08:00 为啥不友好?我觉得就挺好的 单独写个项目来处理这些定时任务不就行了 |
![]() | 10 justseemore 2018-07-30 17:39:59 +08:00 写 daemon 啊,时间肯定比一分钟短。。 |
11 victrec 2018-07-30 17:46:04 +08:00 |
![]() | 12 thinkwei2012 2018-07-30 17:46:27 +08:00 同意 Redis |
![]() | 13 hahasong 2018-07-30 17:47:06 +08:00 写个 go 服务长驻进程,周期性检查处理 |
![]() | 14 Zzdex OP |
![]() | 16 lshero 2018-07-30 18:04:31 +08:00 延时队列 |
![]() | 17 brickyang 2018-07-30 18:07:46 +08:00 via iPhone ![]() |
18 lihongjie0209 2018-07-30 18:13:19 +08:00 DelayQueue 可以做, 但是一旦你考虑到任务持久化的问题, 轮询数据库最简单 |
19 sampeng 2018-07-30 18:16:03 +08:00 了解一下 time wheel。。。。。其实就定时某一个时间点自然是每隔多久检查一下当前时间是什么时候。。 |
21 jimmyye 2018-07-30 19:02:03 +08:00 ![]() http://docs.celeryproject.org/en/latest/userguide/calling.html#eta-and-countdown >The ETA (estimated time of arrival) lets you set a specific date and time that is the earliest time at which your task will be executed. countdown is a shortcut to set ETA by seconds into the future. |
![]() | 22 wq7 2018-07-30 19:09:52 +08:00 ![]() 1. celery 自带按照指定时间执行的任务功能,不过使用 redis 有坑(可以自己先踩踩)。 2. 用 go 实现一个定时。 3. 现成的定时框架。 |
23 Raymon111111 2018-07-30 19:17:41 +08:00 ![]() 用缓存+时间片 然后轮询时间片 |
![]() | 26 qf0129 2018-07-31 17:50:32 +08:00 eta 是个啥 这就不清楚了 |
![]() | 27 fangdingjun 2018-08-01 09:43:16 +08:00 我会用最懒的办法,数据库记录过期时间,显示订单时再更新状态 |