Show More
@@ -91,8 +91,16 b' def magic_tasks(self,line):' | |||||
91 |
|
91 | |||
92 | A 'task' is a process that has been started in IPython when 'jobctrl' extension is enabled. |
|
92 | A 'task' is a process that has been started in IPython when 'jobctrl' extension is enabled. | |
93 | Tasks can be killed with %kill. |
|
93 | Tasks can be killed with %kill. | |
|
94 | ||||
|
95 | '%tasks clear' clears the task list (from stale tasks) | |||
94 | """ |
|
96 | """ | |
95 | ip = self.getapi() |
|
97 | ip = self.getapi() | |
|
98 | if line.strip() == 'clear': | |||
|
99 | for k in ip.db.keys('tasks/*'): | |||
|
100 | print "Clearing",ip.db[k] | |||
|
101 | del ip.db[k] | |||
|
102 | return | |||
|
103 | ||||
96 | ents = job_list(ip) |
|
104 | ents = job_list(ip) | |
97 | if not ents: |
|
105 | if not ents: | |
98 | print "No tasks running" |
|
106 | print "No tasks running" |
General Comments 0
You need to be logged in to leave comments.
Login now