@@ -77,7 +77,8 @@ def __init__(self, model, app=None):
77
77
self ._disable (model )
78
78
79
79
self .options = {}
80
- for option in ['queue' , 'exchange' , 'routing_key' , 'expires' ]:
80
+ for option in ['queue' , 'exchange' , 'routing_key' , 'expires' ,
81
+ 'priority' ]:
81
82
value = getattr (model , option )
82
83
if value is None :
83
84
continue
@@ -170,11 +171,12 @@ def _unpack_fields(cls, schedule,
170
171
171
172
@classmethod
172
173
def _unpack_options (cls , queue = None , exchange = None , routing_key = None ,
173
- ** kwargs ):
174
+ priority = None , ** kwargs ):
174
175
return {
175
176
'queue' : queue ,
176
177
'exchange' : exchange ,
177
178
'routing_key' : routing_key ,
179
+ 'priority' : priority
178
180
}
179
181
180
182
def __repr__ (self ):
@@ -202,9 +204,9 @@ def __init__(self, *args, **kwargs):
202
204
Scheduler .__init__ (self , * args , ** kwargs )
203
205
self ._finalize = Finalize (self , self .sync , exitpriority = 5 )
204
206
self .max_interval = (
205
- kwargs .get ('max_interval' ) or
206
- self .app .conf .beat_max_loop_interval or
207
- DEFAULT_MAX_INTERVAL )
207
+ kwargs .get ('max_interval' )
208
+ or self .app .conf .beat_max_loop_interval
209
+ or DEFAULT_MAX_INTERVAL )
208
210
209
211
def setup_schedule (self ):
210
212
self .install_default_entries (self .schedule )
0 commit comments