Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move Tasks from a plugin to s4u
[simgrid.git] / examples / python / task-variable-load / task-variable-load.py
index 5e437e3..63925d9 100644 (file)
@@ -27,17 +27,17 @@ def parse():
     )
     return parser.parse_args()
 
-def callback( t):
-    print(f'[{Engine.clock}] { t} finished ({ t.count})')
+def callback(t):
+    print(f'[{Engine.clock}] {t} finished ({t.count})')
 
-def variable_load( t):
+def variable_load(t):
     print('--- Small load ---')
-    for i in range(3):
+    for _ in range(3):
         t.enqueue_execs(1)
         this_actor.sleep_for(100)
     this_actor.sleep_for(1000)
     print('--- Heavy load ---')
-    for i in range(3):
+    for _ in range(3):
         t.enqueue_execs(1)
         this_actor.sleep_for(1)
 
@@ -45,7 +45,6 @@ if __name__ == '__main__':
     args = parse()
     e = Engine(sys.argv)
     e.load_platform(args.platform)
-    Task.init()
 
     # Retrieve hosts
     tremblay = e.host_by_name('Tremblay')