Modified cluster

This commit is contained in:
thosakwe 2016-12-24 11:16:54 -05:00
parent 02d378dedf
commit c1e50126c9
3 changed files with 8 additions and 7 deletions

View file

@ -4,8 +4,9 @@ library angel.cluster;
import 'dart:async'; import 'dart:async';
import 'common.dart'; import 'common.dart';
import 'dart:isolate';
main() async { main(args, SendPort sendPort) async {
runZoned(startServer(clustered: true), onError: onError); runZoned(startServer(args, clustered: true, sendPort: sendPort),
onError: onError);
} }

View file

@ -4,8 +4,8 @@ import 'package:angel/angel.dart';
import 'package:angel_diagnostics/angel_diagnostics.dart'; import 'package:angel_diagnostics/angel_diagnostics.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
startServer({bool clustered: false}) { startServer(args, {bool clustered: false, SendPort sendPort}) {
return (args, [SendPort sendPort]) async { return () async {
var app = await createServer(); var app = await createServer();
var dateFormat = new DateFormat("y-MM-dd"); var dateFormat = new DateFormat("y-MM-dd");
var logFile = new File("logs/${dateFormat.format(new DateTime.now())}.txt"); var logFile = new File("logs/${dateFormat.format(new DateTime.now())}.txt");

View file

@ -2,6 +2,6 @@
import 'dart:async'; import 'dart:async';
import 'common.dart'; import 'common.dart';
main() async { main(args) async {
runZoned(startServer(), onError: onError); runZoned(startServer(args), onError: onError);
} }