Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hey Guys, Hope You'Re Having A Good Week

Hey guys, hope you're having a good week 🙂

How can i get the status of a task in the queue?

` status = Task.enqueue(
cloned,
queue_name='default',
)

#now get the status of the queue task `

  
  
Posted 3 years ago
Votes Newest

Answers 6


RobustRat47 , Hi!
Do you mean the task position in the queue?

  
  
Posted 3 years ago

if it's completed or not

  
  
Posted 3 years ago

Yep 🙂
Basically:
` task = Task.get_task(task_id='aaaa')
while task.status not in ('completed', 'stopped',):

do something ?

sleep(15) `(Notice task.status / task.get_status() will refresh the Task status on every call)

  
  
Posted 3 years ago

I've got it... i just remembered I can call
task_idfrom the cloned tasked and check the status of that 🙂

  
  
Posted 3 years ago

Thanks Martin 🙂 just seen this worked as expected

  
  
Posted 3 years ago

so I guess if the status has changed from running to completed

  
  
Posted 3 years ago
1K Views
6 Answers
3 years ago
one year ago
Tags