Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
20 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
# scheduler.py | ||
|
||
def datetime_handler(x): | ||
if isinstance(x, datetime.timedelta): | ||
return x.isoformat() | ||
raise TypeError("Unknown type") | ||
|
||
|
||
from tasks import tiger, my_task, push | ||
from tasktiger import Task | ||
import json | ||
import datetime | ||
from bson import json_util | ||
now = datetime.datetime.now() | ||
now_plus_10 = now + datetime.timedelta(seconds = 5) | ||
|
||
#task = Task(tiger, my_task, (['ruchir'])) | ||
#print task.delay(when=datetime.timedelta(seconds = 5)) | ||
|
||
def message(time, line): | ||
task = Task(tiger, push, ([line])) | ||
print task.delay(when=time) | ||
def message(**kwargs): | ||
refs = ['seconds', 'minutes', 'hours', 'days'] | ||
ref = '' | ||
val = '' | ||
text = '' | ||
if kwargs is not None: | ||
for key, value in kwargs.iteritems(): | ||
if key in refs: | ||
ref = key | ||
val = value | ||
if key == 'text': | ||
text = value | ||
|
||
task = Task(tiger, push, ([text])) | ||
print task.delay(when=datetime.timedelta(**{ref: val})) |
Submodule snowboy
added at
c03be3
Submodule speech-to-text-websockets-python
added at
067695
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters