Page MenuHomePhorge

No OneTemporary

diff --git a/src/applications/conduit/method/daemon/launched/ConduitAPI_daemon_launched_Method.php b/src/applications/conduit/method/daemon/launched/ConduitAPI_daemon_launched_Method.php
index 40de95cf49..636b9ab138 100644
--- a/src/applications/conduit/method/daemon/launched/ConduitAPI_daemon_launched_Method.php
+++ b/src/applications/conduit/method/daemon/launched/ConduitAPI_daemon_launched_Method.php
@@ -1,68 +1,68 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @group conduit
*/
class ConduitAPI_daemon_launched_Method extends ConduitAPIMethod {
public function shouldRequireAuthentication() {
// TODO: Lock this down once we build phantoms.
return false;
}
public function shouldAllowUnguardedWrites() {
- return false;
+ return true;
}
public function getMethodDescription() {
return "Used by daemons to log run status.";
}
public function defineParamTypes() {
return array(
'daemon' => 'required string',
'host' => 'required string',
'pid' => 'required int',
'argv' => 'required string',
);
}
public function defineReturnType() {
return 'string';
}
public function defineErrorTypes() {
return array(
);
}
protected function execute(ConduitAPIRequest $request) {
$daemon_log = new PhabricatorDaemonLog();
$daemon_log->setDaemon($request->getValue('daemon'));
$daemon_log->setHost($request->getValue('host'));
$daemon_log->setPID($request->getValue('pid'));
$daemon_log->setArgv(json_decode($request->getValue('argv')));
$daemon_log->save();
return $daemon_log->getID();
}
}
diff --git a/src/applications/conduit/method/daemon/log/ConduitAPI_daemon_log_Method.php b/src/applications/conduit/method/daemon/log/ConduitAPI_daemon_log_Method.php
index c89469d77c..4965888273 100644
--- a/src/applications/conduit/method/daemon/log/ConduitAPI_daemon_log_Method.php
+++ b/src/applications/conduit/method/daemon/log/ConduitAPI_daemon_log_Method.php
@@ -1,67 +1,67 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @group conduit
*/
class ConduitAPI_daemon_log_Method extends ConduitAPIMethod {
public function shouldRequireAuthentication() {
// TODO: Lock this down once we build phantoms.
return false;
}
public function shouldAllowUnguardedWrites() {
- return false;
+ return true;
}
public function getMethodDescription() {
return "Used by daemons to log events.";
}
public function defineParamTypes() {
return array(
'daemonLogID' => 'required int',
'type' => 'required string',
'message' => 'optional string',
);
}
public function defineReturnType() {
return 'void';
}
public function defineErrorTypes() {
return array(
);
}
protected function execute(ConduitAPIRequest $request) {
$daemon_event = new PhabricatorDaemonLogEvent();
$daemon_event->setLogID($request->getValue('daemonLogID'));
$daemon_event->setLogType($request->getValue('type'));
$daemon_event->setMessage((string)$request->getValue('message'));
$daemon_event->setEpoch(time());
$daemon_event->save();
return;
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sun, Jan 19, 12:56 (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1124807
Default Alt Text
(4 KB)

Event Timeline