Modified cluster
This commit is contained in:
parent
02d378dedf
commit
c1e50126c9
3 changed files with 8 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
import 'dart:async';
|
||||
import 'common.dart';
|
||||
|
||||
main() async {
|
||||
runZoned(startServer(), onError: onError);
|
||||
main(args) async {
|
||||
runZoned(startServer(args), onError: onError);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue