diff --git a/bin/cluster.dart b/bin/cluster.dart index 8403f8c..d9e5e93 100644 --- a/bin/cluster.dart +++ b/bin/cluster.dart @@ -4,8 +4,9 @@ library angel.cluster; import 'dart:async'; import 'common.dart'; +import 'dart:isolate'; -main() async { - runZoned(startServer(clustered: true), onError: onError); +main(args, SendPort sendPort) async { + runZoned(startServer(args, clustered: true, sendPort: sendPort), + onError: onError); } - diff --git a/bin/common.dart b/bin/common.dart index 6c59228..683a997 100644 --- a/bin/common.dart +++ b/bin/common.dart @@ -4,8 +4,8 @@ import 'package:angel/angel.dart'; import 'package:angel_diagnostics/angel_diagnostics.dart'; import 'package:intl/intl.dart'; -startServer({bool clustered: false}) { - return (args, [SendPort sendPort]) async { +startServer(args, {bool clustered: false, SendPort sendPort}) { + return () async { var app = await createServer(); var dateFormat = new DateFormat("y-MM-dd"); var logFile = new File("logs/${dateFormat.format(new DateTime.now())}.txt"); diff --git a/bin/server.dart b/bin/server.dart index fd46b52..88a206c 100755 --- a/bin/server.dart +++ b/bin/server.dart @@ -2,6 +2,6 @@ import 'dart:async'; import 'common.dart'; -main() async { - runZoned(startServer(), onError: onError); +main(args) async { + runZoned(startServer(args), onError: onError); }